package com.wn.common.model

import androidx.lifecycle.LiveData

/**
 * @Author: wn
 * @Date: 2022/12/8 16:12
 * @Description: 创建一个空的 liveData 对象来转接数据
 */
class AbsentLiveData<T : Any?> private constructor() : LiveData<T>() {
  init {
    postValue(null)
  }

  companion object {
    fun <T : Any?> create(): LiveData<T> = AbsentLiveData()
  }
}